Validates if a value is a Date object.