Better fix for possible type checking