to avoid null pointer exception