Metadata fixes

- make `getPrefixAndSuffixCannotBeTheSame` public so that the validator can access it;
 - make the prefix/comparison null-safe