Fix feature detection error undefined method pointer on nil:NilClass.
Merge pull request #1457 from gw0/fix-feature-detection-nil

Fix feature detection error undefined method pointer on nil:NilClass.