Adding some checks to avoid repeating analyses.