Replaced the duck typing check with a true nd.array check