first(list) should behave the same way as first(iterable) in case of null argument.
@@ -1549,7 +1549,7 @@ public class GridFunc {
* @return List' first element or {@code null} in case if list is empty.
*/
public static <T> T first(List<? extends T> list) {
- if (list.isEmpty())
+ if (list == null || list.isEmpty())
return null;
return list.get(0);
