smart searching by a:, o: and r:. also error handling for invalid animal id, owner id and res. id