Bug 959542 - Handle empty tables cleanly

Array#max can return nil
Merge pull request #376 from smarterclayton/bug_959542_handle_empty_tables_better

Merged by openshift-bot