i am using the below code for comparing two values:
function CompareValue($ValueTobePresent,$ExpectedValue)
{
var $ValueTobePresent=$ValueTobePresent.toLocaleLowerCase();
var $ExpectedValue = $ExpectedValue.toLocaleLowerCase();
_assertEqual($ValueTobePresent, $ExpectedValue);
}
Now my problem is if a null value is passed the function fails with the below message: Logging exception: Cannot call method "toLocaleLowerCase" of null [81 ms] Cannot call method "toLocaleLowerCase" of null.
Is there a way i can solve it out so that i can handle the null values also? Also i have around 25 comparisons to do so i want the code not to be very time consuming.
Thanks