add catches for nil objects