Prevent error when using an empty jQuery selector