Added null-checks to moq commands' protected members