check the type instead of a string comparison