Small fix with type validation