check that key data is not empty, and return error otherwise.