[BUGFIX] Type safe check for $BE_USER in index_ts.php