The equality operator was comparing the raw floats when two were given. Also, type() was called when it was not needed.