Metadata fixes

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