Validate image field

check if content is actually an image, using mimetype.
+ Fix: get_contenttype works when empty string is given as contentType.