Added extra safety checks in "isComplete" for #474

As per your request :-)
Linked to issue #474