Improved primitive types discovery