validate hash key parameter exist before preg_match

PLAT-1733 #time 15m