We need to add a null check for safety.  Because our layouts are going to be dynamic we need to be able handle the case where we try to disable a MenuItem that doesn't exist.  I know in the previous example there wasn't a null check.  Thats because that piece of code was in an optionsmenyoncreate call where we can assert the existence of certain items.

In summary for disabling a menu item first check if its null. That means it already is gone.