better type checking for datetime conversion