Optimize lookup of genes for a gene type
inline for performance
allow disabling of asserts