Refactor and Null Checks