how about just `else if(edit && ...`, the comparison to `nil` is implied...