Check if context creation was successful before accessing it

Should we do something in the `else` path when context creation did not succeed? What happens there?