fix tautological compare error
Fix implicit conversion warnings for getter.