add null-check