Use numerical equality, moves the prim return type hint in the right place and uses unchecked ops.