Data type validation helper for use with ruby.