A generalization of realcompact spaces