Better log message if context is not an activity

Otherwise you get a ClassCastException a bit later