[utils] better check image content type