Fix instances where isset is use instead of !empty and add test cases

Closes #3556329

Merge request reports

Loading