image type validation.