Check the image size, not the projection size when importing a layer
For some reason, some people want to import empty images as layers...
That should be possible, I guess, for reasons to do with image
structure. So check whether the image has valid bounds, not the
image projection, since that means the import has succeeded.
See https://www.reddit.com/r/krita/comments/blnk7n/questions_regarding_batch_import_layers/