validate hash key parameter exist before preg_match

PLAT-1733 #time 15m
Merge pull request #1589 from kaltura/IX-9.19.2-PLAT-1733

validate hash key parameter exist before preg_match