Add fallback for function that returns null rather than throws an
exception