Removed use of type-juggling comparison operators

Removed use of type-juggling comparison operators.
The type-comparing comparision operators are safer to use in a
security-sensitive code and faster [1].

[1] http://stackoverflow.com/questions/6356826/comparing-versus