How to programmatically detect whether a product is configurable?