New function to validate a UUID