Annotate types to avoid using polymorphic compare

Signed-off-by: David Scott <dave.scott@eu.citrix.com>