Add missing check for field/method validity.