Check type well formedness for top level function where constraints