Fix the error: undefined pointers[0]

The function isDefAndNotNull(val) doesn't test the undefined value.