Fix minor issue

Needed to return the boolean from function checkRequiredFields