protect against type conversion errors