Assure that nil values are removed from array calculations