As a java developer I tend to write expressions like this:
//primitive check
if(constant == variable)
//Object check
if(constant.equals(variable))
This is particularly important for the object because the expression doesn't error if the variable is null. If the expression were in the other order, a null variable would error. I maintain consistency and do the same order for primitives.