removing unnecessary nil checks