結果 : typescript only call function if not null