fix view trigger - use undefined and null check
fix view trigger - only trigger when dirty