fix licenses detection

use _.isArray instead of typeof that returns 'object'