Explicitly cast id and validate type
Better phpdoc and method naming