Checking bean type