Fix Null pointers in API - Lets try this again

Its possible for update to refrence a null string, and this fixes the
null pointers by checking first