I was explaining to a colleague that you should use === and !== (and >== and <== of course) when comparing variables in
===
!==
>==
<==
Is there some sort of operator for > and < that do not coerce the type
No.
how can I change my test to perform the test safely
You would have to explicitly test the types:
typeof a === typeof b && a > b