validation for image type