Added null checks to addFriend.py