Check bean type.