Fixing the array.indexOf method check

Signed-off-by: Andrew Lowther <andy.lowther@mademedia.co.uk>