error message improved, NULL support