Adds fail fast assertions for invalid input