fix is_image() helper (closes #1)