LPS-38283 Recovered Factory pattern and sync with current code style
LPS-38283 Not need to check for null because we use factory and can be certain no null strings are going to be passed