Do cheap comparison first in if statement, small performance enhancement