function indexOf(collection, element) {

  if (!collection || !element) {
    return -1;
  }

  return collection.indexOf(element);
}
Fail save get the index of an element in a collection.

@param {Array<Object>} collection
@param {Object} element

@return {number} the index or -1 if collection or element do
                 not exist or the element is not contained.