Added check for array value to remove notice