erp5_hal_json_style: check if isWebMode is present before calling it.
(cherry picked from commit ee7cb2097c4da4bf9a0a7afca1ff2726aa92b2ef)