Merge pull request #43 from swilliams/master

Added validation for empty array.