Reverted check for class type and added test for datetime