Issue warning if no data

Patch by Picnic Pete: https://github.com/picnicpete

Since pr270 was badly formatted this is nicer.