HG-16: Mercury API Extension

DO NOT MERGE, THIS PR IS PART OF PROJECT MERCURY! 
It looks like these boilerplate validity checks could be moved to a separate function that could be reused throughout the controller.