removing multiple check conditions to single check condition
Merge pull request #13276 from aayushkhandelwal11/change_to_key

removing multiple check conditions to single check condition