fixed and simplified some nil checks to coorospond with database defaults