raise a error instead of returning nil