fixed error when looking up null value