ADDED: stri_prepare_arg_logical in .R file and corrected check order in .cpp