validate hash key parameter exist before preg_match

PLAT-1733 #time 15m
Merge pull request #1588 from kaltura/IX-9.19.1-PLAT-1733

validate hash key parameter exist before preg_match