instead of just checking the types, I recommend to check the values as well.