MINOR LeftAndMain::getRecord check $ClassName before use

While the check for `$classname` was done in the first conditional, it was left out of the other two, leading to potential issues when an invalid ID was given, instead of the expected `false`.
Merge pull request #3102 from ss23/patch-3

MINOR LeftAndMain::getRecord check $ClassName before use