Fix null check of extension methods