verification of opts parameter

The reason I would recommend structuring it like this because we want to catch 3 edge cases.
1) The case where the opts parameter is not passed. In this case opts parameter is actually the callback.

2) The second case we want to catch is if a non object is passed as the opts parameter. The second if statement will catch that.
3) Lastly, we want to catch the case where opts is passed but has no select property. We want to default in that case.