You expect it to be an EasyVersion instance, but you never check/enforce that. So, if you pass a string, the comparison will fail since a string and EasyVersion can never be identical.