Changed comparing undefined to null to just checking if num doesn't exist. This is a slightly more elegant solution and less reliant on a JavaScript quirk that treats undefined and null both as false.
Merge pull request #3 from MJGrant/MathServiceFix

Changed comparing undefined to null to just checking if num doesn't exis...