avoid null reference