Implemented boundaries for to_<type> and equality, added tests