A better check for the existence of matlabinput element.
Merge pull request #4612 from edx/dcs/matlab-api-tweak

A better check for the existence of matlabinput element.