Better error message for NULL input