If you compare against None, then make sure to use 'is' vs ==

    if UserMgr.get(username) is None:

or you I think you could just do

    if UserMgr.get(username)