Add an extra isset check to $arg->slug

By adding the check if $arg->slug does not exist there will not be an notice