added check for presence of field