added check for main property if checkExistence is true and throwing an exception if the check fails

fixes #8