add possibility to check for null and to retrieve a substring