Functional ecology and imperfect detection of species