Treat invalid uuid as nil
Test for _before_type_cast in case of invalid uuid.