String functions return null instead of crashing