Fix null cases for string contains operators

Previously, startsWith, endsWith, and contains observers would throw an
exception if the input was undefined.