getValue() - add extra check due to bug in php https://bugs.php.net/bug.php?id=65499