Add null/empty checks to UUIDSerializer methods.