Make the error checking language independent

Isn't it prettier to check if the image post is empty instead of checking an error message here?