SCAL-322: do not search attribute if nil