Fixed null issue that occured when trying to create user and the uniqueness check didn't work.