Checking image type