Improved inout validation