static HashMap<String, String> validateFields(Class model, Object object) {
        HashMap<String, String> errors = new HashMap<>();
        Field[] fields = getFields(model);
        for (Field f : fields) {
            try {
                if (f.get(object) == null) {
                    errors.put(f.getName(), ServiceConstants.FIELD_MUST_NOT_BE_NULL);
                } else if (!f.getClass().isAssignableFrom(f.get(object).getClass())) {
                    errors.put(f.getName(), "Value assigned to field is not applicable.");
                }
            } catch (IllegalArgumentException | IllegalAccessException ex) {
                Logger.getLogger(DbUtils.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return errors;
    }