Abstracted wait_for_load function. Return None if error encountered.