validate and require return types