hash_equals raises a warning on wrong types

Also moved all good tests