remove unnesessary null checks