Avoid Undefined index error due to empty criteria of "type = lookup"

This could happen with lookup field is allow empty.