Make platform impl return nulls on error instead of empty strings, check for null in calling code