fixing extension method invocation null checks