Do checks for nil as well as empty