optimized indexof for a known property