[BUGFIX] Check if value is array to prevent a PHP warning