Fix bug 1285958 avoid NPE when haFlag is null and set haFlag to off in meta-db in this case