Code to cope with an acceptable case of null user context